package SE2;

import java.util.GregorianCalendar;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author rink
 */
public class PurchaserTest {

	Purchaser instance;
	
    public PurchaserTest() {

    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
    	instance = new Purchaser();
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of getLastLogin method, of class Purchaser.
     */
    @Test
    public void testGetLastLogin() {
    	setUp();
    	System.out.println("getLastLogin");
        instance.setLastLogin(new GregorianCalendar(1,1,2010));
        instance.setName("Max Mustermann");
        instance.setPassword("super");
        GregorianCalendar expResult = new GregorianCalendar(1,1,2010);
        GregorianCalendar result = instance.getLastLogin();
        assertEquals(expResult.getTimeInMillis(), result.getTimeInMillis());
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of setLastLogin method, of class Purchaser.
     */
    @Test
    public void testSetLastLogin() {
    	setUp();
    	System.out.println("setLastLogin");
        GregorianCalendar lastLogin = new GregorianCalendar(1,1,2010);
        instance.setLastLogin(lastLogin);
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of getName method, of class Purchaser.
     */
    @Test
    public void testGetName() {
    	setUp();
        System.out.println("getName");
        instance.setLastLogin(new GregorianCalendar(1,1,2010));
        instance.setName("Max Mustermann");
        instance.setPassword("super");
        String expResult = "Max Mustermann";
        String result = instance.getName();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of setName method, of class Purchaser.
     */
    @Test
    public void testSetName() {
    	setUp();
        System.out.println("setName");
        String name = "Max Mustermann";
        instance.setName(name);
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of getPassword method, of class Purchaser.
     */
    @Test
    public void testGetPassword() {
    	setUp();
    	System.out.println("getPassword");
        instance.setLastLogin(new GregorianCalendar(1,1,2010));
        instance.setName("Max Mustermann");
        instance.setPassword("super");
        String expResult = "super";
        String result = instance.getPassword();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of setPassword method, of class Purchaser.
     */
    @Test
    public void testSetPassword() {
    	setUp();
    	System.out.println("setPassword");
        String password = "super";
        instance.setPassword(password);
        // TODO review the generated test code and remove the default call to fail.
        //fail("The test case is a prototype.");
    }

    /**
     * Test of viewStoreSituaton method, of class Purchaser.
     */
    @Test
    public void testViewStoreSituaton() {
    	setUp();
    	System.out.println("viewStoreSituaton");
        instance.viewStoreSituaton();
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of checkProposedProductionPlan method, of class Purchaser.
     */
    @Test
    public void testCheckProposedProductionPlan() {
    	setUp();
    	System.out.println("checkProposedProductionPlan");
        boolean expResult = false;
        boolean result = instance.checkProposedProductionPlan();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of makePurchase method, of class Purchaser.
     */
    @Test
    public void testMakePurchase() {
    	setUp();
    	System.out.println("makePurchase");
        instance.makePurchase();
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

}